//
// Created by liushuai on 18-10-29.
//

#include "Teacher.h"
//常量num_s只能使用列表初始化
Teacher::Teacher(string n, int a,int num):Age(a),Name(n),num_s(10) {
    cout<<"Construct Teacher:"<<"\n";
}
int Teacher::getAge() {
    return Age;
}
string Teacher::getName() {
    return Name;
}
void Teacher::setAge(int age) {
    Age = age;
}
void Teacher::setName(string& name) {
    Name = name;
}
int Teacher::get_max() {
    return num_s;
}
Teacher::Teacher(Teacher& t):Name(t.getName()),Age(t.getAge()),num_s(9) {
    cout<<"调用拷贝构造函数"<<"\n";
}